// 计算两个时间之间的时间差 多少天时分秒
function intervalTime (startTime, endTime) {
  const differ = endTime + (24 * 3600 * 1000) - startTime
  const days = Math.floor(differ / (24 * 3600 * 1000))
  const differHours = differ % (24 * 3600 * 1000)
  const hours = Math.floor(differHours / (3600 * 1000))
  return days + '天 ' + hours + '小时 '
}

function onlyDay (startTime, endTime) {
  const differ = endTime + (24 * 3600 * 1000) - startTime
  const days = Math.ceil(differ / (24 * 3600 * 1000))
  // console.log(days)
  return days
}

module.exports = {
  intervalTime,
  onlyDay
}
